package com.itheima.controller;

import com.itheima.vo.Books;
import org.springframework.web.bind.annotation.*;

//Rest模式
@RestController
@RequestMapping("/books")
public class BookController {

    @GetMapping
    public String getById(){
        System.out.println("getting");
        return "springboot is running...3";
    }

    @PostMapping
    public String getById2(@RequestBody Books books){
        System.out.println(books.toString());
        return "springboot is running...3";
    }

    @GetMapping("/aaaaa")
    public String getById3(){
        System.out.println("aaaa");
        return "springboot is running...3";
    }
}
